package com.wash.shoes.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wash.shoes.entity.ShoeRackPo;
import com.wash.shoes.entity.ShopShoeRackPo;
import com.wash.shoes.mapper.ShopShoeRackMapper;
import com.wash.shoes.page.PageFactory;
import com.wash.shoes.service.ShopShoeRackService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 门店关联的鞋架 服务实现类
 * </p>
 *
 * @author ljg
 * @since 2024-10-13
 */
@Service
public class ShopShoeRackServiceImpl extends ServiceImpl<ShopShoeRackMapper, ShopShoeRackPo> implements ShopShoeRackService {

    @Override
    public Page<ShoeRackPo> noConnectionRackList(String rackCode, String shopId) {
        Page page = PageFactory.defaultPage();
        List<ShoeRackPo> dataList = this.baseMapper.noConnectionRackList(page, rackCode, shopId);
        page.setRecords(dataList);
        return page;
    }

    @Override
    public Page<ShoeRackPo> shopRackList(String shopId) {
        Page page = PageFactory.defaultPage();
        List<ShoeRackPo> dataList = this.baseMapper.shopRackList(page, shopId);
        page.setRecords(dataList);
        return page;
    }

    @Override
    public ShopShoeRackPo shopAssociateRack(String rackId, String shopId) {
        return this.baseMapper.shopAssociateRack(rackId, shopId);
    }


}
